Optimal. Leaf size=236 \[ \frac {85 A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{8 a^{3/2} d}-\frac {15 A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a-a \sec (c+d x)}}\right )}{\sqrt {2} a^{3/2} d}-\frac {A \cos ^2(c+d x) \sin (c+d x)}{d (a-a \sec (c+d x))^{3/2}}+\frac {35 A \sin (c+d x)}{8 a d \sqrt {a-a \sec (c+d x)}}+\frac {25 A \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a-a \sec (c+d x)}}+\frac {4 A \cos ^2(c+d x) \sin (c+d x)}{3 a d \sqrt {a-a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.46, antiderivative size = 236, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 6, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {4105, 4107,
4005, 3859, 209, 3880} \begin {gather*} \frac {85 A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{8 a^{3/2} d}-\frac {15 A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a-a \sec (c+d x)}}\right )}{\sqrt {2} a^{3/2} d}+\frac {35 A \sin (c+d x)}{8 a d \sqrt {a-a \sec (c+d x)}}+\frac {4 A \sin (c+d x) \cos ^2(c+d x)}{3 a d \sqrt {a-a \sec (c+d x)}}-\frac {A \sin (c+d x) \cos ^2(c+d x)}{d (a-a \sec (c+d x))^{3/2}}+\frac {25 A \sin (c+d x) \cos (c+d x)}{12 a d \sqrt {a-a \sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3859
Rule 3880
Rule 4005
Rule 4105
Rule 4107
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) (A+A \sec (c+d x))}{(a-a \sec (c+d x))^{3/2}} \, dx &=-\frac {A \cos ^2(c+d x) \sin (c+d x)}{d (a-a \sec (c+d x))^{3/2}}+\frac {\int \frac {\cos ^3(c+d x) (8 a A+7 a A \sec (c+d x))}{\sqrt {a-a \sec (c+d x)}} \, dx}{2 a^2}\\ &=-\frac {A \cos ^2(c+d x) \sin (c+d x)}{d (a-a \sec (c+d x))^{3/2}}+\frac {4 A \cos ^2(c+d x) \sin (c+d x)}{3 a d \sqrt {a-a \sec (c+d x)}}-\frac {\int \frac {\cos ^2(c+d x) \left (-25 a^2 A-20 a^2 A \sec (c+d x)\right )}{\sqrt {a-a \sec (c+d x)}} \, dx}{6 a^3}\\ &=-\frac {A \cos ^2(c+d x) \sin (c+d x)}{d (a-a \sec (c+d x))^{3/2}}+\frac {25 A \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a-a \sec (c+d x)}}+\frac {4 A \cos ^2(c+d x) \sin (c+d x)}{3 a d \sqrt {a-a \sec (c+d x)}}+\frac {\int \frac {\cos (c+d x) \left (\frac {105 a^3 A}{2}+\frac {75}{2} a^3 A \sec (c+d x)\right )}{\sqrt {a-a \sec (c+d x)}} \, dx}{12 a^4}\\ &=-\frac {A \cos ^2(c+d x) \sin (c+d x)}{d (a-a \sec (c+d x))^{3/2}}+\frac {35 A \sin (c+d x)}{8 a d \sqrt {a-a \sec (c+d x)}}+\frac {25 A \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a-a \sec (c+d x)}}+\frac {4 A \cos ^2(c+d x) \sin (c+d x)}{3 a d \sqrt {a-a \sec (c+d x)}}-\frac {\int \frac {-\frac {255 a^4 A}{4}-\frac {105}{4} a^4 A \sec (c+d x)}{\sqrt {a-a \sec (c+d x)}} \, dx}{12 a^5}\\ &=-\frac {A \cos ^2(c+d x) \sin (c+d x)}{d (a-a \sec (c+d x))^{3/2}}+\frac {35 A \sin (c+d x)}{8 a d \sqrt {a-a \sec (c+d x)}}+\frac {25 A \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a-a \sec (c+d x)}}+\frac {4 A \cos ^2(c+d x) \sin (c+d x)}{3 a d \sqrt {a-a \sec (c+d x)}}+\frac {(85 A) \int \sqrt {a-a \sec (c+d x)} \, dx}{16 a^2}+\frac {(15 A) \int \frac {\sec (c+d x)}{\sqrt {a-a \sec (c+d x)}} \, dx}{2 a}\\ &=-\frac {A \cos ^2(c+d x) \sin (c+d x)}{d (a-a \sec (c+d x))^{3/2}}+\frac {35 A \sin (c+d x)}{8 a d \sqrt {a-a \sec (c+d x)}}+\frac {25 A \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a-a \sec (c+d x)}}+\frac {4 A \cos ^2(c+d x) \sin (c+d x)}{3 a d \sqrt {a-a \sec (c+d x)}}+\frac {(85 A) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,\frac {a \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{8 a d}-\frac {(15 A) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,\frac {a \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{a d}\\ &=\frac {85 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{8 a^{3/2} d}-\frac {15 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a-a \sec (c+d x)}}\right )}{\sqrt {2} a^{3/2} d}-\frac {A \cos ^2(c+d x) \sin (c+d x)}{d (a-a \sec (c+d x))^{3/2}}+\frac {35 A \sin (c+d x)}{8 a d \sqrt {a-a \sec (c+d x)}}+\frac {25 A \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a-a \sec (c+d x)}}+\frac {4 A \cos ^2(c+d x) \sin (c+d x)}{3 a d \sqrt {a-a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.87, size = 314, normalized size = 1.33 \begin {gather*} \frac {A \left (-\frac {5 \sqrt {2} e^{-\frac {1}{2} i (c+d x)} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \left (-17 i d x+17 \sinh ^{-1}\left (e^{i (c+d x)}\right )+24 \sqrt {2} \log \left (1-e^{i (c+d x)}\right )+17 \log \left (1+\sqrt {1+e^{2 i (c+d x)}}\right )-24 \sqrt {2} \log \left (1+e^{i (c+d x)}+\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}\right )\right )}{d}+\frac {\left (-61 \cos \left (\frac {1}{2} (c+d x)\right )-120 \cos \left (\frac {3}{2} (c+d x)\right )+72 \cos \left (\frac {5}{2} (c+d x)\right )+11 \cos \left (\frac {7}{2} (c+d x)\right )+2 \cos \left (\frac {9}{2} (c+d x)\right )\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {\sec (c+d x)}}{6 d}\right ) \sec ^{\frac {3}{2}}(c+d x) \sin ^3\left (\frac {1}{2} (c+d x)\right )}{8 (a-a \sec (c+d x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1103\) vs.
\(2(205)=410\).
time = 8.85, size = 1104, normalized size = 4.68
method | result | size |
default | \(\text {Expression too large to display}\) | \(1104\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.52, size = 572, normalized size = 2.42 \begin {gather*} \left [-\frac {180 \, \sqrt {2} {\left (A \cos \left (d x + c\right ) - A\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} + {\left (3 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{{\left (\cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) + 255 \, {\left (A \cos \left (d x + c\right ) - A\right )} \sqrt {-a} \log \left (\frac {2 \, {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} - {\left (2 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{\sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) + 2 \, {\left (8 \, A \cos \left (d x + c\right )^{5} + 26 \, A \cos \left (d x + c\right )^{4} + 73 \, A \cos \left (d x + c\right )^{3} - 50 \, A \cos \left (d x + c\right )^{2} - 105 \, A \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}}}{48 \, {\left (a^{2} d \cos \left (d x + c\right ) - a^{2} d\right )} \sin \left (d x + c\right )}, \frac {180 \, \sqrt {2} {\left (A \cos \left (d x + c\right ) - A\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) - 255 \, {\left (A \cos \left (d x + c\right ) - A\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) - {\left (8 \, A \cos \left (d x + c\right )^{5} + 26 \, A \cos \left (d x + c\right )^{4} + 73 \, A \cos \left (d x + c\right )^{3} - 50 \, A \cos \left (d x + c\right )^{2} - 105 \, A \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}}}{24 \, {\left (a^{2} d \cos \left (d x + c\right ) - a^{2} d\right )} \sin \left (d x + c\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} A \left (\int \frac {\cos ^{3}{\left (c + d x \right )}}{- a \sqrt {- a \sec {\left (c + d x \right )} + a} \sec {\left (c + d x \right )} + a \sqrt {- a \sec {\left (c + d x \right )} + a}}\, dx + \int \frac {\cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{- a \sqrt {- a \sec {\left (c + d x \right )} + a} \sec {\left (c + d x \right )} + a \sqrt {- a \sec {\left (c + d x \right )} + a}}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.16, size = 208, normalized size = 0.88 \begin {gather*} \frac {\frac {180 \, \sqrt {2} A \arctan \left (\frac {\sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a}}{\sqrt {a}}\right )}{a^{\frac {3}{2}}} - \frac {255 \, A \arctan \left (\frac {\sqrt {2} \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a}}{2 \, \sqrt {a}}\right )}{a^{\frac {3}{2}}} - \frac {12 \, \sqrt {2} \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a} A}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} - \frac {\sqrt {2} {\left (63 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{\frac {5}{2}} A + 272 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{\frac {3}{2}} A a + 324 \, \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a} A a^{2}\right )}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a\right )}^{3} a}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^3\,\left (A+\frac {A}{\cos \left (c+d\,x\right )}\right )}{{\left (a-\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________